/*添加帐号信息*/
var addUser={};
addUser.bmlock=false;
addUsersubForm=function(){
    if(addUser.bmlock)return;
    addUser.bmlock=true;
    console.log($("#addUser_form1").serialize());
    mccmsa.ajax({
        url:"user/addUser",
        method:"post",
        data:$("#addUser_form1").serialize(),
        dataType:"json",
        success:function(data){
            if(data.status==200){
                $("#username2").val($("#username1"));
                mccmsa.ajax({
                    url:"contractInfo/addContractInfo",
                    method:"post",
                    data:$("#addUser_form2").serialize(),
                    dataType:"json",
                    success:function(data){

                    }
                })
            }
        }
    });
};
/*$("#addUser_form1").validate({
    debug:true,//调试模式取消submit的默认提交功能,等ajax验证完之后才提交
    onsubmit:true,// 是否在提交是验证
    onfocusout:false,// 是否在获取焦点时验证
    onkeyup :false,// 是否在敲击键盘时验证
    submitHandler: function(form) {

    },
    errorPlacement: function (error, element) {
       /!* if ($(".mask").html() != "")
            return false;
        $(".mask").html("").show();
        error.appendTo($(".mask"));
        setTimeout(function () {
            $(".mask").empty().fadeOut();
        }, 1000);*!/
    },
    rules: {
        nickName:{
            required:true,
            rangelength:[6,20]
        },
        mobilePhone:{
            required:true,
            moBile:true
        },
        realName:{
            required:true,
            rangelength:[6,20],
            regexName:true
        },
        email:{
            required:true,
            email:true
        },
        companyType:{
            required:true
        }
    },
    messages:{
        nickName:{
            required:"请输入企业名称",
            rangelength:"请输入2-20个字符"
        },
        realName:{
            required:'请输入法人名称',
            rangelength:"请输入2-20个字符",
            regexName:"法人名称只能输入中文"
        },
        mobilePhone:{
            required:"请输入手机号码",
            moBile:"手机号码格式错误"

        },
        email:{
            required:"请输入邮箱",
            email:"邮箱格式错误"
        },
        companyType:{
            required:"请选择企业类型"
        }
    }
});*/

